import request from "@/utils/request";

// 查询薪酬管理列表
export function listCldPayDetails(query) {
  return request({
    url: "/cld/CldPayDetails/list",
    method: "get",
    params: query,
  });
}

// 查询薪酬管理详细
export function getCldPayDetails(payDetailsId) {
  return request({
    url: "/cld/CldPayDetails/" + payDetailsId,
    method: "get",
  });
}

// 新增薪酬管理
export function addCldPayDetails(data) {
  return request({
    url: "/cld/CldPayDetails",
    method: "post",
    data: data,
  });
}

// 修改薪酬管理
export function updateCldPayDetails(data) {
  return request({
    url: "/cld/CldPayDetails",
    method: "put",
    data: data,
  });
}

// 批量修改薪酬管理
export function batchEdit(data) {
  return request({
    url: "/cld/CldPayDetails/batchEdit",
    method: "put",
    data: data,
  });
}

// 删除薪酬管理
export function delCldPayDetails(payDetailsId) {
  return request({
    url: "/cld/CldPayDetails/" + payDetailsId,
    method: "delete",
  });
}

// 实时薪酬列表
export function selectRealTimeSalaryGrouping(query) {
  return request({
    url: "/cld/CldPayDetails/selectRealTimeSalaryGrouping",
    method: "get",
    params: query,
  });
}

// 累计薪酬列表
export function getCumulativeSalaryList(query) {
  return request({
    url: "/cld/CldPayDetails/getCumulativeSalaryList",
    method: "get",
    params: query,
  });
}

// 累计薪酬列表 - 按项目查看 - 待发薪酬
export function getCumulativeSalaryByProjectId(query) {
  return request({
    url: "/cld/CldPayDetails/getCumulativeSalaryByProjectId",
    method: "get",
    params: query,
  });
}

// 累计薪酬列表 - 按项目查看 - 实发薪酬
export function getCumulativeSalaryByProjectIdList(query) {
  return request({
    url: "/cld/CldPayDetails/getCumulativeSalaryByProjectIdList",
    method: "get",
    params: query,
  });
}

// 实时薪酬 - 按项目查看
export function getTableCalendarList(query) {
  return request({
    url: "/cld/CldPayDetails/getTableCalendarList",
    method: "get",
    params: query,
  });
}

// 实时薪酬 - 按人员查看
export function getCalendarByStaffId(query) {
  return request({
    url: "/cld/CldPayDetails/getCalendarByStaffId",
    method: "get",
    params: query,
  });
}

// 工资统计
export function selectSalaryStatistics(query) {
  return request({
    url: "/cld/CldPayDetails/selectSalaryStatistics",
    method: "get",
    params: query,
  });
}


// 薪酬发放
export function confirmIssuance(data) {
  return request({
    url: "/cld/confirm/confirmIssuance",
    method: "put",
    data: data,
  });
}



// 薪资统计 - 头部
export function salaryHeadStatistics() {
  return request({
    url: "/cld/CldPayDetails/salaryHeadStatistics",
    method: "get",
  });
}